<template>
  <div id="app">
    <router-view/>
  </div>
</template>

<script>
export default {
  name: 'App',
  mounted() {
    let htmlSize=document.documentElement.clientWidth || document.body.clientWidth
    let html=document.getElementsByTagName("html")[0]
    html.style.fontSize=htmlSize/120+"px"
    //当浏览器窗口大小发生改变时,触发事件
    window.addEventListener("resize",(e) => {
      let htmlSize=document.documentElement.clientWidth || document.body.clientWidth
      html=document.getElementsByTagName("html")[0]
      html.style.fontSize=htmlSize/120+"px"
    })


  }
}
</script>

<style>
</style>
